package com.cfpamf.ms.insur.pay.facade.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 退款DTO
 *
 * @author zhangnayi
 */
@Data
@ApiModel
@Validated
public class RefundOrderDTO {

    /**
     * 商户系统编号
     */
    @ApiModelProperty("商户系统编号")
    @NotNull(message = "商户系统编号不能为空")
    private String sourceSys;

    /**
     * 商户系统订单号
     */
    @ApiModelProperty("商户系统订单号")
    private String sourceOrderId;

    /**
     * 支付系统订单编号
     */
    @ApiModelProperty("支付系统订单编号")
    private String orderNo;

    /**
     * 退款金额，必填
     */
    @ApiModelProperty("退款金额，必填")
    @NotNull(message = "退款金额不能为空")
    @DecimalMin(message = "退款金额不能小于或等于0",value = "0.01")
    private BigDecimal refundAmount;

    /**
     * 退款原因，必填
     */
    @ApiModelProperty("退款原因，可选")
    private String refundReason;
}
